<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">公告标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item layui-form-text">
            <div class="layui-input-block">
                <textarea name="desc" class="layui-textarea" id="info" style="display:none"></textarea>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公告内容</label>
        <div id="editor" class="layui-input-block">
            <p>请输入公告内容</p>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit type="button" id="save">保存</button>
        </div>
    </div>
</form>
<script src="/jquery/jquery3.1.js"></script>
<script type="text/javascript" src="/release/wangEditor.min.js"></script>
<script type="text/javascript">
    var E = window.wangEditor;
    var editor = new E('#editor');
    // 配置服务器端地址
    editor.customConfig.uploadImgServer = '/uploads';
    editor.customConfig.uploadFileName = 'images';
    // 同步内容到textarea
    var info = $('#info');
    editor.customConfig.onchange = function (html) {
        info.val(html);
    }
    editor.create();
</script>